#ifndef TUBMOVE_H
#define TUBMOVE_H

#include <QWidget>
#include <QButtonGroup>
#include <QStandardItemModel>
#include <QButtonGroup>
#include <QStringListModel>
#include <QSet>
#include <map>
#include "src/DataProvider/Image/imgprovider.h"
#include "src/DataProvider/App/SysMembers.h"



namespace Ui {
class TubMove;
}

class TubMove : public QWidget
{
    Q_OBJECT

public:
    explicit TubMove(QWidget *parent = nullptr);
    ~TubMove();
    void initUIs();


    /**
     * @brief updateSelect
     * @details
     * 更新所选择的pos到UI
     * @date 2020-04-10
     */
    void updateSelect(RobotPos);
    void updateSelect(RobotAxle);
    int getRadioGroupIndex();
    void updateSportList();
public slots:
    void on_tb_takePic_clicked();
    void on_tb_delete_clicked();
    void on_tb_goto_clicked();
    void on_tb_add_clicked();
    void on_tb_import_clicked();
    void on_cb_MoveType_activated(int index);
    void on_tb_clean_clicked();
    void on_listView_clicked(const QModelIndex &index);

private slots:
    void on_pb_run_clicked();

private:
    Ui::TubMove *ui;
    QButtonGroup *radioGroup;           // Radio的按钮组
    QStandardItemModel *ItemModel;      // 运动模型


    std::vector<RobotPos> listPos;      // 运动队列
    std::vector<RobotAxle> listAxle;      // 运动队列
    bool curModel;  //  [true] Axle  ,  [False] RobotPos


private:
    RobotPos _curSelect;        // 当前所选择的pos
    RobotAxle _curSelectAxle;        // 当前所选择的Axle
    int selectIndex;        // 所选择的序号
};

#endif // TUBMOVE_H
